package org.zzk.dao;

import com.google.gson.JsonObject;
import lombok.Data;

@Data
public class ChessMove {
    private final int fromX;
    private final int fromY;
    private final int toX;
    private final int toY;

    public JsonObject toJson() {
        JsonObject json = new JsonObject();
        json.addProperty("from_x", fromX);
        json.addProperty("from_y", fromY);
        json.addProperty("to_x", toX);
        json.addProperty("to_y", toY);
        return json;
    }
}
